home *** CD-ROM | disk | FTP | other *** search
/ Electronics Boutique Catalog 1996 Spring / 1996 Electronics Boutique Spring CD-ROM (USA).bin / eb / demos / muppets.dir / 00048.ls < prev    next >
Encoding:
Text File  |  1995-12-13  |  2.5 KB  |  106 lines

  1. global gMovieSprite, gMovieDuration, gReturnFrame, gCurrentFrame, gControlSprite1, gControlSprite2, gControlSprite3, gPauseSprite, gFirstTime
  2.  
  3. on startMovie
  4.   set gMovieSprite to 20
  5.   set gControlSprite1 to 7
  6.   set gControlSprite2 to 8
  7.   set gControlSprite3 to 9
  8.   set gPauseSprite to 10
  9.   set the exitLock to 1
  10.   set click to the number of cast "clickSound"
  11.   preLoadCast(click)
  12. end
  13.  
  14. on legalButton whichSprite
  15.   repeat while the stillDown
  16.     updateStage()
  17.   end repeat
  18.   return 1
  19. end
  20.  
  21. on stopAllQT
  22.   repeat with x = 1 to 48
  23.     if the type of sprite x > 0 then
  24.       if the castType of cast the castNum of sprite x = #digitalVideo then
  25.         set the movieRate of sprite x to 0
  26.       end if
  27.     end if
  28.   end repeat
  29. end
  30.  
  31. on find whichCast, startFrame, endFrame
  32.   repeat with x = startFrame to endFrame
  33.     go(x)
  34.     repeat with y = 1 to 48
  35.       if the type of sprite y > 0 then
  36.         if the castNum of sprite y = whichCast then
  37.           put "Cast member " & whichCast & " was found in frame " & x & ", in channel " & y & "."
  38.         end if
  39.       end if
  40.     end repeat
  41.   end repeat
  42. end
  43.  
  44. on delayFor howLong
  45.   set howLong to the timer + howLong
  46.   repeat while the timer < howLong
  47.     updateStage()
  48.   end repeat
  49. end
  50.  
  51. on pressButton whichSprite, whichSound, whichCast1, whichCast2, whichFrame
  52.   puppetSound(whichSound)
  53.   repeat with x = 1 to 2
  54.     set the castNum of sprite whichSprite to the number of cast whichCast1
  55.     updateStage()
  56.     delayFor(10)
  57.     set the castNum of sprite whichSprite to the number of cast whichCast2
  58.     updateStage()
  59.     delayFor(10)
  60.   end repeat
  61.   repeat while the soundBusy of 1
  62.     updateStage()
  63.   end repeat
  64.   blackFrame(whichFrame)
  65. end
  66.  
  67. on blackFrame whichFrame
  68.   if the frame <> label("BlackFrame") then
  69.     repeat with x = 1 to 48
  70.       if the type of sprite x > 0 then
  71.         set the locV of sprite x to -500
  72.       end if
  73.     end repeat
  74.     updateStage()
  75.   end if
  76.   if whichFrame > 0 then
  77.     go(whichFrame)
  78.   end if
  79.   puppetSound(0)
  80. end
  81.  
  82. on advanceToCurrentFrame
  83.   repeat while the mouseDown
  84.     updateStage()
  85.   end repeat
  86.   if gCurrentFrame > 5 then
  87.     set gCurrentFrame to 0
  88.   end if
  89.   set the visible of sprite 7 to 0
  90.   set the visible of sprite 8 to 0
  91.   set the visible of sprite 9 to 0
  92.   blackFrame("story" & string(gCurrentFrame))
  93.   set gFirstTime to 1
  94. end
  95.  
  96. on FadeToBlackFrame
  97.   repeat with x = 1 to 48
  98.     if the type of sprite x > 0 then
  99.       set the locV of sprite x to -500
  100.     end if
  101.   end repeat
  102.   puppetTransition(50, 0, 12)
  103.   updateStage()
  104.   puppetTransition(0)
  105. end
  106.